package au.com.iglootech.TaxTimeToolTip.dao;

import java.io.Serializable;
import java.util.Collection;
import java.util.Map;

import javax.persistence.criteria.DomainObject;

import com.google.appengine.api.datastore.Key;

public interface GenericDaoService extends Serializable {

	public <T extends DomainObject> T findByKey(Class<T> clazz, Key id);

	public <T extends DomainObject> Collection<T> findAll(Class<T> clazz);

	public <T extends DomainObject> void remove(T domainObj);

	public <T extends DomainObject> Collection<T> findByNamedQuery(
			Class<T> clazz, String namedQuery, Map<String, Object> values);

	public <T extends Object> T save(T domainObj);

	public void flush();
}
